import request from '@/utils/request'

// 查询单个章节内容列表
export function listChapterContent(query) {
  return request({
    url: '/novel/chapterContent/list',
    method: 'get',
    params: query
  })
}

// 获取章节内容
export function getChapterContent(chapterId) {
  return request({
    url: '/novel/chapterContent/' + chapterId,
    method: 'get'
  })
}

// 更新章节内容
export function updateChapterContent(data) {
  return request({
    url: '/novel/chapterContent',
    method: 'put',
    data: data
  })
}

// 创建章节内容
export function createChapterContent(data) {
  return request({
    url: '/novel/chapterContent',
    method: 'post',
    data: data
  })
}

// 删除章节内容
export function deleteChapterContent(chapterId) {
  return request({
    url: '/novel/chapterContent/' + chapterId,
    method: 'delete'
  })
}
